﻿<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html;charset=utf-8">
<title>jQuery Countdown</title>
<style type="text/css">
@import "jquery.countdown.css";
#defaultCountdown { width: 700px; height: 100px; }
body {
font-family: Arial;
font-size: 60px
}
</style>
<script type="text/javascript" src="jquery-1.8.1.min.js"></script>
<script type="text/javascript" src="jquery.countdown.js"></script>
<script type="text/javascript">
$(function () {
	var austDay = new Date();
	var Current = new Date();
	austDay = new Date(Current.getFullYear(), Current.getMonth(), Current.getDate(), 10, 26, 0, 0); 
	$('#defaultCountdown').countdown({until: austDay});
	$('#year').text(austDay.getFullYear());
	
	var minutesStr = austDay.getMinutes();
	minutesStr = minutesStr + "";	
	if(minutesStr.length==1)minutesStr= "0" + minutesStr;
	$('#endtime').text("Counting down to " + austDay.getHours() + ":" + minutesStr);
	
	
	$('#highlightCountdown').countdown({until: 0,
	onTick: highlightLast5});
	
function highlightLast5(periods) {
	if ($.countdown.periodsToSeconds(periods) == 120) {
		$(this).addClass('highlight');
	}
}

$('#highlightButton').click(function() {
	$('#highlightCountdown').removeClass('highlight').
		countdown('option', {until: +10});
});
});
</script>
</head>
<body>
<center>
<h1><div id="endtime" style="font-size: 40px"></div></h1>
<div id="defaultCountdown"></div>
</center>
</body>
</html>
